package com.his.service;

import com.his.commons.core.exception.HisException;
import com.his.controller.form.NewScheduleForm;
import com.his.controller.form.ScheduleByDayForm;
import com.his.controller.form.ScheduleClearForm;
import com.his.controller.form.ScheduleInfoForm;
import com.his.controller.info.ScheduleInfo;
import com.his.controller.info.UserByDayInfo;
import com.his.model.Schedule;
import com.baomidou.mybatisplus.extension.service.IService;

import java.text.ParseException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 梅津铧
 * @since 2022-03-22
 */
public interface ScheduleService extends IService<Schedule> {

    /**
     * 创建某诊室的医生排班信息
     * @param newScheduleForm 排班信息
     */
    boolean increaseSchedules(NewScheduleForm newScheduleForm) throws HisException;

    /**
     * 注册某诊室医生的排班信息
     * @param form 排班信息
     */
    boolean modifyByInfo(ScheduleInfoForm form) throws HisException;

    /**
     * 根据科室、日期信息获取医生信息
     * @param scheduleByDayForm 科室、日期信息
     * @return  医生信息
     */
    List<UserByDayInfo> obtainByDay(ScheduleByDayForm scheduleByDayForm) throws HisException;

    /**
     * 清空某诊室医生的排班信息
     * @param form 诊室医生信息
     */
    boolean modifyState(ScheduleClearForm form) throws HisException;

    /**
     * 根据科室、诊室查询排班信息
     * @param departmentId  科室id
     * @param disagnosisRoomId  诊室id
     * @return  排班信息
     */
    List<ScheduleInfo> obtainSchedule(Integer departmentId, Integer disagnosisRoomId) throws HisException;

    /**
     * 清除某科室的排班信息
     * @param scheduleUserIds  员工工号
     * @param departmentId  科室id
     * @param disagnosisId  诊室id
     */
    boolean logoutSchedule(List<Integer> scheduleUserIds, Integer departmentId, Integer disagnosisId) throws HisException;
}
